﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Validation;
using System.Threading;
using System.Threading.Tasks;
using LabNet.Server.Domain;

namespace LabNet.Server.Data
{
    public interface IDataContext
    {
        //IDbSet<User> Users { get; set; }
        //IDbSet<UserLogin> UserLogins { get; set; }
        //IDbSet<UserClaim> UserClaims { get; set; }
        //IDbSet<UserRole> UserRoles { get; set; }
        //IDbSet<Role> Roles { get; set; }
        //IDbSet<Group> Groups { get; set; }
        //IDbSet<UserGroup> UserGroups { get; set; }
        //IDbSet<RoleGroup> RoleGroups { get; set; }
        Database Database { get; }
        DbChangeTracker ChangeTracker { get; }
        DbContextConfiguration Configuration { get; }
        int Commit();
        Task<int> CommitAsync();
        IDbSet<T> DbSet<T>() where T : BaseObject;
        DbSet Set(Type entityType);
        int SaveChanges();
        Task<int> SaveChangesAsync();
        Task<int> SaveChangesAsync(CancellationToken cancellationToken);
        IEnumerable<DbEntityValidationResult> GetValidationErrors();
        DbEntityEntry Entry<T>(T entity) where T : BaseObject;
        DbEntityEntry Entry(object entity);
        void Dispose();
        string ToString();
        bool Equals(object obj);
        int GetHashCode();
        Type GetType();
       
    }
}